<template>
  <div class="carousel w">
    <el-carousel :interval="4000" type="card" height="320px">
      <el-carousel-item v-for="item in imgList" :key="item.id">
        <img :src="item.src" alt="" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const imgList = ref([
  { id: 0, src: "http://img61.ddimg.cn/2022/3/31/2022033111265180774.jpg" },
  {
    id: 1,
    src: "http://img61.ddimg.cn/upload_img/00838/cxtc/750x315_0331-1648711003.jpg",
  },
  {
    id: 3,
    src: "http://img62.ddimg.cn/upload_img/00316/by/750-315-1648708335.jpg",
  },
]);
</script>

<style scoped lang="less">
.carousel {
  padding-top: 20px;
}
img {
  height: 100%;
}
// .el-carousel__item h3 {
//   color: #475669;
//   font-size: 14px;
//   opacity: 0.75;
//   line-height: 200px;
//   margin: 0;
//   text-align: center;
// }

// .el-carousel__item:nth-child(2n) {
//   background-color: #99a9bf;
// }

// .el-carousel__item:nth-child(2n + 1) {
//   background-color: #d3dce6;
// }
</style>
